import { createRouter, createWebHistory } from 'vue-router'

import { routes } from './initRoute'

export const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

// 重置基础路由
export const resetRouter = () => {
    const newRouter = createRouter
    router.matcher = newRouter.matcher
}
